package com.lms.logistics_management_system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lms.logistics_management_system.entity.Announcement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lms.logistics_management_system.entity.WaterOrder;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author LENOVO
* @description 针对表【announcement】的数据库操作Mapper
* @createDate 2023-02-22 23:05:13
* @Entity com.lms.logistics_management_system.entity.Announcement
*/
public interface AnnouncementMapper extends BaseMapper<Announcement> {

    List<Announcement> getAllInfo();

    boolean delAnnoucement(Integer id);

    @Select("SELECT * FROM announcement WHERE time=(SELECT MAX(time) FROM announcement)")
    List<Announcement> getLatestNews();
}




